//
//  ToolsCustom.h
//  WYModel
//
//  Created by ios on 2017/3/3.
//  Copyright © 2017年 Wy. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

@interface ToolsCustom : NSObject

/**判断是否是手机号码*/
+ (BOOL)validatePhone:(NSString *)phone;
/**判断身份证信息*/
+(BOOL) validateIdentityCard: (NSString *)identityCard;
/**判断邮箱号*/
+(BOOL)validateEmail:(NSString *)email;
/**车架号正则*/
+ (BOOL) checkCheJiaNumber:(NSString *) CheJiaNumber;
/**车牌号正则*/
+(BOOL) validateCarNo:(NSString *)carNo;
/**护照正则*/
+(BOOL)validataPassport:(NSString *)passport;
/**军官证正则*/
+(BOOL)validataOfficerID:(NSString *)officerID;
/**邮编正则*/
+(BOOL)validataZipCode:(NSString *)code;
/**转换空字符串*/
+ (NSString*) convertNull:(id)object;
/**获取及其识别码UUid*/
+ (NSString*) uniqueAppInstanceIdentifier;
/**删除对应文件夹*/
+ (void)removeFileName:(NSString *)fileName;
/**刷新列表的某行*/
+(void)refeshUITableView:(UITableView *)tableView section:(NSInteger )section row:(NSInteger )row;
/**将字典或者数组转化为JSON串*/
+ (NSString *)toJSONData:(id)theData;
/**将JSON串转化为字典或者数组*/
+ (id)toArrayOrNSDictionary:(NSString *)jsonString;
/**时间戳转字符串*/
+(NSString *)timestampToString:(NSString *)timestamp;
/**时间戳转字符串(自定义格式)*/
+(NSString *)timestampToString:(NSString *)timestamp withDataFormat:(NSString *)dataFormat;
/**根据文字，及大小宽度计算label高度*/
+(CGFloat)getSpaceLabelHeight:(NSString*)str withFont:(UIFont*)font withWidth:(CGFloat)width lineSpacing:(CGFloat)spacing;

/**给label 设置行间距和字间距*/
+(void)setLabelSpace:(UILabel*)label withValue:(NSString*)str withFont:(UIFont*)font lineSpacing:(CGFloat)spacing;
/**根据文字长度获取宽度*/
+(CGFloat)setLabelText:(NSString *)text textFont:(UIFont *)font;
@end
